use chrono::{DateTime, Utc};
use serde::{Deserialize, Serialize};
/// 项目信息
#[derive(Debug, Serialize, Deserialize)]
pub struct Project {
    pub id: i64,
    pub name: String,
    pub web_url: String,
    pub created_at: DateTime<Utc>,
}

#[derive(Serialize, Deserialize, Debug, Clone)]
pub struct Commit {
    /// The ID of the commit.
    pub id: String,

    pub title: String,
    /// The commit author's name.
    pub author_name: String,
    /// The commit author's email address.
    pub author_email: String,

    pub created_at: DateTime<Utc>,

    pub stats: RepoCommitStats,

    pub branch: Option<String>,
}

#[derive(Serialize, Deserialize, Debug, Clone, Copy)]
pub struct RepoCommitStats {
    /// The number of lines added by the commit.
    pub additions: u64,
    /// The number of lines deleted by the commit.
    pub deletions: u64,
    /// The number of lines changed by the commit.
    pub total: u64,
}

#[derive(Serialize, Deserialize, Debug, Clone)]
pub struct Branch {
    pub name: String,
}
